import api from "@/api";
import { PORT } from "../config/servicePort";

/**
 * 登录
 * @param data
 * @returns
 */
export async function login(data: any): Promise<any> {
	return api.post(`${PORT}/Login/Login`, data);
}

/**
 * 退出登录
 */
export async function logout(): Promise<any> {
	return api.post(`${PORT}/Login/logout`);
}

/**
 * 获取省市区
 */
export async function getRegion(data: any): Promise<any> {
	return api.get(`/api/District/getList`, data);
}

/**
 * 获取上传到七牛云的token
 */
export async function getQiniuyunToken() {
	return api.get(`/api/upload/getToken`);
}
